package chap4.Task;
public class Task4 {
    public static void main(String[] args) {
        int i = 1;
        int sum=0;
        while (i <= 1000) {
            sum+=i;
            i++;

        }
        System.out.print("1-1000之间的和为" +sum);
    }

}
